Google ADK Tool Instrumentation#1768
Conversation
✅MegaLinter analysis: Success
Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop-google-adk #1768 +/- ##
=====================================================
Coverage ? 81.62%
=====================================================
Files ? 216
Lines ? 26602
Branches ? 4193
=====================================================
Hits ? 21715
Misses ? 3469
Partials ? 1418 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| except Exception: | ||
| _logger.warning(TOOL_EXTRACTOR_FAILURE_LOG_MESSAGE, exc_info=True) | ||
|
|
||
| func_name = callable_name(wrapped) |
There was a problem hiding this comment.
In our agent spec, it's not a requirement that we include the full callable name in the function trace name. Since this one is pretty long, I'm wondering if we're better off just using the name of the wrapped function. The goal with using the full name was more so to disambiguate the function name so the customer is clear what function was wrapped.
|
|
||
| ft = FunctionTrace(name=function_trace_name, group="Llm/tool/GoogleADK") | ||
| ft.__enter__() | ||
| ft._add_agent_attribute("subcomponent", json.dumps(agentic_subcomponent_data)) |
There was a problem hiding this comment.
Going forward, we will ideally only want to send the subcomponent attr if we have a local tool executing. Is there a way in the ADK repo to distinguish between remote and local tools and executions vs invocations?
There was a problem hiding this comment.
Yes to remote vs local, it's distinguishable by class. I've added a gate for this to only add subcomponent to local tools.
I'm not sure what executions vs invocations means in the context of tools here though.
c4fff3f to
191c655
Compare
| transaction.add_ml_model_info("GoogleADK", GOOGLEADK_VERSION) | ||
| transaction._add_agent_attribute("llm", True) |
There was a problem hiding this comment.
@umaannamalai Was this part necessary for tools? I'm pretty sure this is the result of a merge conflict but not certain.
There was a problem hiding this comment.
We actually have been emitting this metric in the tools instrumentation also for other agentic frameworks. The idea was that we'd still get the AI Responses tab to appear if the tool instrumentation was hit independent of the agents instrumentation.
|
Tick the box to add this pull request to the merge queue (same as
|

Overview